# -*- coding: utf-8 -*-
# function 第一个 bottle 例子
# __author__ = 'yeslf'

import bottle
from bottle import  route ,run ,template,request
# 修改默认的 MEMFILE_MAX 大小值
# 默认是 102400 这个值会覆盖 uwsgi中配置文件内容
bottle.BaseRequest.MEMFILE_MAX=800000

@route('/forrequestbody')
def forrequestbody():

    print request.MEMFILE_MAX
    print "this is print MEMFILE_MAX"

    return "MEMFILE_MAX request.MEMFILE_MAX %d " %request.MEMFILE_MAX


@route('/<name>')
def index(name):
    return template('<h1>hello {{name}}</h1>',name=name)

run(host='0.0.0.0',port=80,debug=True,reloader=True)



# https://bottlepy.org/docs/dev/api.html
